import Vue from 'vue';
import Router from 'vue-router';
/* Layout */
import Layout from '@/views/layout/Layout';
import parentView from '@/views/layout/parent-view';

Vue.use(Router);

// 静态路由
export const constantRouterMap = [
    {path: '/404', component: () => import('@/views/error/404'), hidden: true},
    {path: '/login', component: () => import('@/views/system/login'), hidden: true},
    {path: '/register', component: () => import('@/views/system/register'), hidden: true},
    {path: '/forget-password', component: () => import('@/views/system/forget-password.vue'), hidden: true},
    {
        path: '',
        component: Layout,
        redirect: 'home',
        children: [
            {
                path: 'home',
                name: 'Home',
                meta: {title: '主页', icon: 'home', noCache: true},
                component: () => import('@/views/home')
            }]
    },
    {
        path: '/update-password',
        component: Layout,
        redirect: '/update-password/index',
        hidden: true,
        children: [
            {
                path: 'index',
                name: 'index',
                hidden: true,
                meta: {title: '修改密码', noCache: true},
                component: () => import('@/views/system/update-password.vue')
            }]
    }
];

const createRouter = () => new Router({
    // mode: 'history', // require service support
    scrollBehavior: () => ({y: 0}),
    routes: constantRouterMap
});

const router = createRouter();

// 动态路由
export const asyncRouterMap = [
    {
        path: '/shop',
        component: () => import('@/views/shop/index.vue'),
        name: 'shop',
        meta: {title: '订单管理', icon: 'shop'},
        hidden: true
    },
    {
        path: '/member-management',
        name: 'member-management',
        component: Layout,
        meta: {title: '用户管理', icon: 'users'},
        redirect: 'noRedirect',
        children: [
            {
                path: 'member',
                name: 'member',
                component: parentView,
                meta: {title: '用户列表'},
                redirect: '/member-management/member/list',
                children: [
                    {
                        path: 'list',
                        name: 'member-list',
                        hidden: true,
                        component: () => import('@/views/member/index.vue'),
                        meta: {title: '用户列表'}
                    },
                    {
                        path: 'detail/:id',
                        name: 'member-detail',
                        hidden: true,
                        component: () => import('@/views/member/detail.vue'),
                        meta: {title: '用户详情'}
                    },
                    {
                        path: 'order/:id',
                        name: 'member-order',
                        hidden: true,
                        component: () => import('@/views/member/order.vue'),
                        meta: {title: '订单记录'}
                    }]
            },
            {
                path: 'inform',
                name: 'inform',
                component: parentView,
                meta: {title: '用户通知'},
                redirect: '/member-management/inform/list',
                children: [
                    {
                        path: 'list',
                        name: 'inform-list',
                        hidden: true,
                        component: () => import('@/views/member/notification/index.vue'),
                        meta: {title: '设置'}
                    },
                    {
                        path: 'template-list',
                        name: 'inform-template-list',
                        hidden: true,
                        component: () => import('@/views/member/notification/template-list.vue'),
                        meta: {title: '模板列表'}
                    },
                    {
                        path: 'template-add',
                        name: 'inform-template-add',
                        hidden: true,
                        component: () => import('@/views/member/notification/template-add.vue'),
                        meta: {title: '新建模板'}
                    },
                    {
                        path: 'template-edit/:id',
                        name: 'inform-template-edit',
                        hidden: true,
                        component: () => import('@/views/member/notification/template-edit.vue'),
                        meta: {title: '模板编辑'}
                    }
                ]
            }

        ]
    },
    {
        path: '/order-management',
        name: 'order-management',
        component: Layout,
        meta: {title: '订单管理', icon: 'order-monitor', badge: true},
        redirect: 'noRedirect',
        children: [
            {
                path: 'order',
                name: 'order',
                component: parentView,
                meta: { title: '订单列表' },
                redirect: '/order-management/order/list',
                children: [
                    {
                        path: 'list',
                        name: 'order-list',
                        hidden: true,
                        component: () => import('@/views/order/order.vue'),
                        meta: { title: '订单列表' }
                    },
                    {
                        path: 'detail/:id',
                        name: 'order-detail',
                        hidden: true,
                        component: () => import('@/views/order/order-detail.vue'),
                        meta: { title: '订单详情' }
                    }
                ]
            },
            {
                path: 'order-recall',
                name: 'order-recall',
                component: parentView,
                meta: {title: '订单召回'},
                redirect: '/order-management/order-recall/list',
                children: [
                    {
                        path: 'list',
                        name: 'order-recall-list',
                        hidden: true,
                        component: () => import('@/views/order/order-recall.vue'),
                        meta: {title: '订单召回列表'}
                    }
                ]
            }
        ]
    },
    {
        path: '/goods-management',
        name: 'goods-management',
        component: Layout,
        meta: {title: '商品管理', icon: 'goods'},
        redirect: 'noRedirect',
        children: [
            {
                path: 'goods',
                name: 'goods',
                component: parentView,
                meta: {title: '商品列表'},
                redirect: '/goods-management/goods/list',
                children: [
                    {
                        path: 'list',
                        name: 'goods-list',
                        hidden: true,
                        component: () => import('@/views/goods/index.vue')
                    },
                    {
                        path: 'add',
                        name: 'goods-add',
                        hidden: true,
                        component: () => import('@/views/goods/add.vue')
                    },
                    {
                        path: 'detail/:id',
                        name: 'goods-detail',
                        hidden: true,
                        component: () => import('@/views/goods/detail.vue'),
                        meta: { title: '商品详情' }
                    }
                ]
            },
            {
                path: 'series',
                name: 'series',
                component: parentView,
                meta: {title: '商品系列'},
                redirect: '/goods-management/series/list',
                children: [
                    {
                        path: 'list',
                        name: 'series-list',
                        hidden: true,
                        component: () => import('@/views/series/index.vue')
                    },
                    {
                        path: 'add',
                        name: 'series-add',
                        hidden: true,
                        component: () => import('@/views/series/add.vue')
                    },
                    {
                        path: 'detail/:id',
                        name: 'series-detail',
                        hidden: true,
                        component: () => import('@/views/series/detail.vue')
                    }
                ]
            },
            {
                path: 'reviews',
                name: 'reviews',
                component: parentView,
                meta: {title: '商品评论'},
                redirect: '/goods-management/reviews/list',
                children: [
                    {
                        path: 'list',
                        name: 'reviews-list',
                        hidden: true,
                        component: () => import('@/views/reviews/index.vue')
                    },
                    {
                        path: 'setting',
                        name: 'reviews-setting',
                        hidden: true,
                        component: () => import('@/views/reviews/setting.vue')
                    },
                    {
                        path: 'detail/:id',
                        name: 'reviews-detail',
                        hidden: true,
                        component: () => import('@/views/reviews/detail.vue')
                    }
                ]
            }
        ]
    },
    {
        path: '/sales-management',
        component: Layout,
        name: 'sales-management',
        meta: {title: '营销管理', icon: 'marketing'},
        redirect: 'noRedirect',
        children: [
            {
                path: 'coupon-codes',
                name: 'coupon-codes',
                component: parentView,
                meta: {title: '优惠码'},
                redirect: '/sales-management/coupon-codes/list',
                children: [
                    {
                        path: 'list',
                        name: 'coupon-codes-list',
                        hidden: true,
                        component: () => import('@/views/sales-management/coupon-codes.vue'),
                        meta: {title: '优惠码列表'}
                    },
                    {
                        path: 'add',
                        name: 'coupon-codes-add',
                        hidden: true,
                        component: () => import('@/views/sales-management/coupon-codes-add.vue'),
                        meta: {title: '优惠码新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'coupon-codes-edit',
                        hidden: true,
                        component: () => import('@/views/sales-management/coupon-codes-edit.vue'),
                        meta: {title: '优惠码修改'}

                    },
                    {
                        path: 'data/:id',
                        name: 'coupon-codes-data',
                        hidden: true,
                        component: () => import('@/views/sales-management/coupon-codes-data.vue'),
                        meta: {title: '优惠码数据'}

                    }
                ]
            },
            {
                path: 'time-limit',
                name: 'time-limit',
                component: parentView,
                meta: {title: '限时促销'},
                redirect: '/sales-management/time-limit/list',
                children: [
                    {
                        path: 'list',
                        name: 'time-limit-list',
                        hidden: true,
                        component: () => import('@/views/sales-management/time-limit.vue'),
                        meta: {title: '限时促销列表'}
                    },
                    {
                        path: 'add',
                        name: 'time-limit-add',
                        hidden: true,
                        component: () => import('@/views/sales-management/time-limit-add.vue'),
                        meta: {title: '限时促销新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'time-limit-edit',
                        hidden: true,
                        component: () => import('@/views/sales-management/time-limit-edit.vue'),
                        meta: {title: '限时促销编辑'}
                    }
                ]
            },
            {
                path: 'price-reduce',
                name: 'price-reduce',
                component: parentView,
                meta: {title: '满减活动'},
                redirect: '/sales-management/price-reduce/list',
                children: [
                    {
                        path: 'list',
                        name: 'price-reduce-list',
                        hidden: true,
                        component: () => import('@/views/sales-management/price-reduce.vue'),
                        meta: {title: '满减活动列表'}
                    },
                    {
                        path: 'add',
                        name: 'price-reduce-add',
                        hidden: true,
                        component: () => import('@/views/sales-management/price-reduce-add.vue'),
                        meta: {title: '满减活动新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'price-reduce-edit',
                        hidden: true,
                        component: () => import('@/views/sales-management/price-reduce-edit.vue'),
                        meta: {title: '满减活动修改'}
                    },
                    {
                        path: 'detail/:id',
                        name: 'price-reduce-detail',
                        hidden: true,
                        component: () => import('@/views/sales-management/price-reduce-detail.vue'),
                        meta: {title: '满减活动详情'}
                    },
                    {
                        path: 'credit-discount',
                        name: 'price-credit-discount',
                        hidden: true,
                        component: () => import('@/views/sales-management/credit-discount.vue'),
                        meta: {title: '信用卡支付优惠'}
                    }
                ]
            },
            {
                path: 'activity-view',
                name: 'activity-view',
                component: parentView,
                meta: {title: '弹窗公告'},
                redirect: '/sales-management/activity-view/list',
                children: [
                    {
                        path: 'list',
                        name: 'activity-view-list',
                        hidden: true,
                        component: () => import('@/views/sales-management/activity-view.vue'),
                        meta: {title: '弹窗公告列表'}
                    },
                    {
                        path: 'add',
                        name: 'activity-view-add',
                        hidden: true,
                        component: () => import('@/views/sales-management/activity-view-add.vue'),
                        meta: {title: '弹窗公告新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'activity-view-edit',
                        hidden: true,
                        component: () => import('@/views/sales-management/activity-view-edit.vue'),
                        meta: {title: '弹窗公告编辑'}
                    },
                    {
                        path: 'copy/:id',
                        name: 'activity-view-copy',
                        hidden: true,
                        component: () => import('@/views/sales-management/activity-view-copy.vue'),
                        meta: {title: '弹窗公告复制'}
                    }
                ]
            },
            {
                path: 'sales-pop',
                name: 'sales-pop',
                component: parentView,
                meta: {title: '浮窗通知'},
                redirect: '/sales-management/sales-pop/index',
                children: [
                    {
                        path: 'index',
                        name: 'sales-pop-index',
                        hidden: true,
                        component: () => import('@/views/sales-management/sales-pop.vue'),
                        meta: {title: '浮窗通知'}
                    }
                ]
            }

        ]
    },
    {
        path: '/app-market',
        name: 'app-market',
        component: Layout,
        meta: {title: '应用工具', icon: 'order-monitor'},
        redirect: 'noRedirect',
        children: [
            {
                path: 'app-private',
                name: 'app-private',
                component: parentView,
                meta: {title: '开发者应用'},
                redirect: '/app-market/app-private/list',
                children: [
                    {
                        path: 'list',
                        name: 'app-private-list',
                        hidden: true,
                        component: () => import('@/views/appmarket/app-private.vue'),
                        meta: {title: '开发者应用列表'}
                    },
                    {
                        path: 'add',
                        name: 'app-private-add',
                        hidden: true,
                        component: () => import('@/views/appmarket/app-private-add.vue'),
                        meta: {title: '新增开发者应用'}
                    }
                ]
            },
            {
                path: 'marketing-tools',
                name: 'marketing-tools',
                component: parentView,
                meta: {title: '营销工具'},
                redirect: '/app-market/marketing-tools/list',
                children: [
                    {
                        path: 'list',
                        name: 'tools-list',
                        hidden: true,
                        component: () => import('@/views/appmarket/tools.vue'),
                        meta: {title: '工具列表'}
                    },
                    {
                        path: 'fb',
                        name: 'data-tracking-fb',
                        hidden: true,
                        component: () => import('@/views/appmarket/data-tracking-fb.vue'),
                        meta: {title: 'Facebook Multi Pixels'}
                    },
                    {
                        path: 'fb-re-tracking',
                        name: 'fb-re-tracking',
                        hidden: true,
                        component: () => import('@/views/appmarket/fb-re-tracking.vue'),
                        meta: {title: 'Facebook 数据辅助工具'}
                    },
                    {
                        path: 'tiktok',
                        name: 'tiktok-pixel',
                        hidden: true,
                        component: () => import('@/views/appmarket/tiktok-pixel.vue'),
                        meta: {title: 'Tiktok Multi Pixels'}
                    },
                    {
                        path: 'google-ads',
                        name: 'google-ads',
                        hidden: true,
                        component: () => import('@/views/appmarket/google-ads.vue'),
                        meta: {title: 'Google Ads'}
                    },
                    {
                        path: 'google-feed',
                        name: 'google-feed',
                        hidden: true,
                        component: () => import('@/views/appmarket/google-feed.vue'),
                        meta: {title: 'Google Feed'}
                    },
                    {
                        path: 'google',
                        name: 'data-tracking-google',
                        hidden: true,
                        component: () => import('@/views/appmarket/data-tracking-google.vue'),
                        meta: {title: 'Google 跟踪代码'}
                    },
                    {
                        path: 'fb-messenger',
                        name: 'fb-messenger',
                        hidden: true,
                        component: () => import('@/views/appmarket/fb-messenger-setting.vue'),
                        meta: {title: 'Facebook Messenger 聊天插件'}
                    },
                    {
                        path: 'fb-domain',
                        name: 'fb-domain',
                        hidden: true,
                        component: () => import('@/views/appmarket/fb-domain.vue'),
                        meta: {title: 'Facebook网域验证'}
                    }
                ]
            },
            {
                path: 'site-design',
                name: 'site-design',
                component: parentView,
                meta: {title: '店铺设计'},
                redirect: '/app-market/site-design/design-list',
                children: [
                    {
                        path: 'design-list',
                        name: 'design-list',
                        hidden: true,
                        component: () => import('@/views/appmarket/design/design-list'),
                        meta: {title: '设计列表'}
                    },
                    {
                        path: 'list',
                        name: 'top-good-list',
                        hidden: true,
                        component: () => import('@/views/appmarket/design/top-good.vue'),
                        meta: {title: '商品置顶列表'}
                    },
                    {
                        path: 'add',
                        name: 'top-good-add',
                        hidden: true,
                        component: () => import('@/views/appmarket/design/top-good-add.vue'),
                        meta: {title: '创建置顶链接'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'top-good-edit',
                        hidden: true,
                        component: () => import('@/views/appmarket/design/top-good-edit.vue'),
                        meta: {title: '编辑置顶链接'}
                    },
                    {
                        path: 'tied-list',
                        name: 'tied-up-list',
                        hidden: true,
                        component: () => import('@/views/appmarket/design/tied-up.vue'),
                        meta: {title: '捆绑列表'}
                    },
                    {
                        path: 'tied-add',
                        name: 'tied-up-add',
                        hidden: true,
                        component: () => import('@/views/appmarket/design/tied-up-add.vue'),
                        meta: {title: '新增组合'}
                    },
                    {
                        path: 'tied-edit/:id',
                        name: 'tied-up-edit',
                        hidden: true,
                        component: () => import('@/views/appmarket/design/tied-up-edit.vue'),
                        meta: {title: '修改组合'}
                    }
                ]
            }
        ]
    },
    {
        path: '/data',
        component: Layout,
        name: 'data',
        meta: {title: '数据', icon: 'shop-decoration'},
        redirect: 'noRedirect',
        children: [
            {
                path: 'overview',
                name: 'overview',
                component: parentView,
                meta: {title: '概览'},
                redirect: '/data/overview/index',
                children: [
                    {
                        path: 'index',
                        name: 'overview-index',
                        hidden: true,
                        component: () => import('@/views/data/overview.vue'),
                        meta: {title: '数据概览'}
                    }
                ]
            },
            {
                path: 'sale',
                name: 'sale',
                component: parentView,
                meta: {title: '销售数据'},
                redirect: '/data/sale/list',
                children: [
                    {
                        path: 'list',
                        name: 'sale-list',
                        hidden: true,
                        component: () => import('@/views/data/sale.vue'),
                        meta: {title: '销售数据列表'}
                    }
                ]
            },
            {
                path: 'product',
                name: 'product',
                component: parentView,
                meta: {title: '商品数据'},
                redirect: '/data/product/list',
                children: [
                    {
                        path: 'list',
                        name: 'product-list',
                        hidden: true,
                        component: () => import('@/views/data/product.vue'),
                        meta: {title: '商品数据列表'}
                    }
                ]
            }
        ]
    },
    {
        path: '/site-decoration',
        component: Layout,
        name: 'site-decoration',
        meta: {title: '店铺装修', icon: 'shop-decoration'},
        redirect: 'noRedirect',
        children: [
            {
                path: 'theme',
                name: 'theme',
                component: parentView,
                meta: {title: '主题装修'},
                redirect: '/theme',
                children: [
                    {
                        path: 'list',
                        name: 'theme-list',
                        hidden: true,
                        component: () => import('@/views/theme/index.vue'),
                        meta: {title: '主题装修列表'}
                    }
                ]
            },
            {
                path: 'custom-page',
                name: 'custom-page',
                component: parentView,
                meta: {title: '自定义页面'},
                redirect: '/site-decoration/custom-page/list',
                children: [
                    {
                        path: 'list',
                        name: 'custom-page-list',
                        hidden: true,
                        component: () => import('@/views/site-decoration/custom-page.vue'),
                        meta: {title: '自定义页面列表'}
                    },
                    {
                        path: 'add',
                        name: 'custom-page-add',
                        hidden: true,
                        component: () => import('@/views/site-decoration/custom-page-add.vue'),
                        meta: {title: '自定义页面添加'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'custom-page-edit',
                        hidden: true,
                        component: () => import('@/views/site-decoration/custom-page-edit.vue'),
                        meta: {title: '自定义页面修改'}
                    }
                ]
            },
            {
                path: 'menu',
                name: 'menu',
                component: parentView,
                meta: {title: '菜单导航'},
                redirect: '/site-decoration/menu/list',
                children: [
                    {
                        path: 'list',
                        name: 'menu-list',
                        hidden: true,
                        component: () => import('@/views/site-decoration/menu.vue'),
                        meta: {title: '菜单导航列表'}
                    },
                    {
                        path: 'add',
                        name: 'menu-add',
                        hidden: true,
                        component: () => import('@/views/site-decoration/menu-add.vue'),
                        meta: {title: '菜单导航新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'menu-edit',
                        hidden: true,
                        component: () => import('@/views/site-decoration/menu-edit.vue'),
                        meta: {title: '菜单导航修改'}
                    }
                ]
            },
            {
                path: 'search-setting',
                name: 'search-setting',
                component: parentView,
                meta: {title: '搜索设置'},
                redirect: '/site-decoration/search-setting/list',
                children: [
                    {
                        path: 'list',
                        name: 'search-setting-list',
                        hidden: true,
                        component: () => import('@/views/site-decoration/search.vue'),
                        meta: {title: '搜索设置列表'}
                    }
                ]
            },
            {
                path: 'material',
                name: 'material',
                component: parentView,
                meta: {title: '素材中心'},
                redirect: '/site-decoration/material/list',
                children: [
                    {
                        path: 'list',
                        name: 'material-list',
                        hidden: true,
                        component: () => import('@/views/site-decoration/material.vue'),
                        meta: {title: '素材列表'}
                    }
                ]
            }
        ]
    },
    {
        path: '/theme',
        component: () => import('@/views/theme/index.vue'),
        name: 'theme',
        meta: {title: '主题装修', icon: 'shop'},
        hidden: true
    },
    {
        path: '/site-management',
        component: Layout,
        name: 'site-management',
        meta: {title: '店铺管理', icon: 'shop'},
        redirect: 'noRedirect',
        children: [
            {
                path: 'site',
                name: 'site',
                component: parentView,
                meta: {title: '店铺列表'},
                redirect: '/site-management/site/list',
                children: [
                    {
                        path: 'list',
                        name: 'site-list',
                        hidden: true,
                        component: () => import('@/views/site/site.vue'),
                        meta: {title: '店铺列表'}
                    },
                    {
                        path: 'add',
                        name: 'site-add',
                        hidden: true,
                        component: () => import('@/views/site/site-add.vue'),
                        meta: {title: '店铺新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'site-edit',
                        hidden: true,
                        component: () => import('@/views/site/site-edit.vue'),
                        meta: {title: '店铺修改'}

                    },
                    {
                        path: 'copy',
                        name: 'site-copy',
                        hidden: true,
                        component: () => import('@/views/site/site-copy.vue'),
                        meta: {title: '店铺复制'}

                    }
                ]
            },
            {
                path: 'staff',
                name: 'staff',
                component: parentView,
                meta: {title: '员工管理'},
                redirect: '/site-management/staff/list',
                children: [
                    {
                        path: 'list',
                        name: 'staff-list',
                        hidden: true,
                        component: () => import('@/views/site/staff.vue'),
                        meta: {title: '员工列表'}
                    },
                    {
                        path: 'add',
                        name: 'staff-add',
                        hidden: true,
                        component: () => import('@/views/site/staff-add.vue'),
                        meta: {title: '员工新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'staff-edit',
                        hidden: true,
                        component: () => import('@/views/site/staff-edit.vue'),
                        meta: {title: '员工修改'}

                    }
                ]
            },
            {
                path: 'collection-channels',
                name: 'collection-channels',
                component: parentView,
                meta: {title: '收款渠道'},
                redirect: '/site-management/collection-channels/list',
                children: [
                    {
                        path: 'list',
                        name: 'collection-channels-list',
                        hidden: true,
                        component: () => import('@/views/site/collection-channels.vue')
                    }
                ]
            },
            {
                path: 'freight',
                name: 'freight',
                component: parentView,
                meta: {title: '运费方案'},
                redirect: '/site-management/freight/list',
                children: [
                    {
                        path: 'list',
                        name: 'freight-list',
                        hidden: true,
                        component: () => import('@/views/site/freight.vue'),
                        meta: {title: '运费方案列表'}
                    },
                    {
                        path: 'add',
                        name: 'freight-add',
                        hidden: true,
                        component: () => import('@/views/site/freight-add.vue'),
                        meta: {title: '运费方案新增'}
                    },
                    {
                        path: 'edit/:id',
                        name: 'freight-edit',
                        hidden: true,
                        component: () => import('@/views/site/freight-edit.vue'),
                        meta: {title: '运费方案修改'}

                    }
                ]
            },
            {
                path: 'tax',
                name: 'tax',
                component: parentView,
                meta: {title: '税费'},
                redirect: '/site-management/tax/list',
                children: [
                    {
                        path: 'list',
                        name: 'tax-list',
                        hidden: true,
                        component: () => import('@/views/site/tax.vue'),
                        meta: {title: '税费方案列表'}
                    }
                ]
            },
            {
                path: 'domain-name',
                name: 'domain-name',
                component: parentView,
                meta: {title: '域名'},
                redirect: '/site-management/domain-name/list',
                children: [
                    {
                        path: 'list',
                        name: 'domain-name-list',
                        hidden: true,
                        component: () => import('@/views/site/domain-name.vue')
                    },
                    {
                        path: 'add',
                        name: 'domain-name-add',
                        hidden: true,
                        component: () => import('@/views/site/domain-name-add.vue'),
                        meta: {title: '域名绑定'}
                    },
                    {
                        path: 'next',
                        name: 'domain-name-next',
                        hidden: true,
                        component: () => import('@/views/site/domain-name-next.vue'),
                        meta: {title: '域名解析'}
                    },
                    {
                        path: 'complete',
                        name: 'domain-name-complete',
                        hidden: true,
                        component: () => import('@/views/site/domain-name-complete.vue')
                    }
                ]
            }

        ]
    }
];

export function resetRouter () {
    const newRouter = createRouter();
    router.matcher = newRouter.matcher; // reset router
}

export default router;
